//#include "x86.h"

static inline void outb (ushort port, uchar data)
{
  __asm__ volatile ("out %0, %1" : : "a" (data), "d" (port));
}

static inline uchar inb(ushort port)
{
  uchar data;

  __asm__ volatile("in %1,%0" : "=a" (data) : "d" (port));
  return data;
}
            
static inline void insl(int port, void *addr, int cnt)
{
   __asm__ volatile("cld\n\trepne\n\tinsl"      :
                    "=D" (addr), "=c" (cnt)    :
                    "d" (port), "0" (addr), "1" (cnt) :
                    "memory", "cc");
}
